// duel
#include<bits/stdc++.h>
using namespace std;


int arr[100005];
queue<int> q;

int main(){
	
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    //README
    
    int n,  temp;
    int p = 100005;
    int res;
    
    cin>>n;
    for(int i = 1; i <= n; i++){
		scanf("%d", &temp);
		arr[temp]++;
		if(temp < p) p = temp;
	}
	
	res = n;
	q.push(p);
	for(int i = p+1; i <= 100005; i++){
		if(arr[i] != 0){
			int a = q.front();
			
			q.push(i);
			if(arr[i] < arr[a]){
				res -= arr[i];
				arr[a] -= arr[i];
			}
			else if(arr[i] == arr[a]){
				res -= arr[a];
				arr[a] = 0;
				q.pop();
			}
			else{
				res -= arr[a];
				q.pop();
			}
		}
	}
	
	cout<<res;
	
    return 0;
}
